//
//  PublishMessage.swift
//  uwantgoeasy
//
//  Created by 冯传宝 on 12/11/15.
//  Copyright © 2015 uwantsoft. All rights reserved.
//

import Foundation

class PublishMessage: ClientMessage {
    private var ackId:String=""
    private var channel:String=""
    private var content:String=""
    private var publishListener:PublishListener?
    
    init(sid: String,channel: String, content: String, publishListener: PublishListener) {
        super.init(sid: sid)
        self.ackId = NSUUID().UUIDString
        self.channel = channel
        self.content = content
        self.publishListener = publishListener
    }
    
    var _publishListener: PublishListener{
        get{
            return publishListener!
        }
    }
    
    var _ackId: String{
        get{
            return ackId
        }
    }
    
    override func typeCode() -> Int {
        return 3
    }
}